package com.hdp.kotlin_samples.high;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.hdp.kotlin_samples.R;

public class TestActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        initClick();
    }

    private void initClick() {
        findViewById(R.id.tv_test1).setOnClickListener(v -> onclickTest());
    }

    private void onclickTest() {
        TextView textView = this.findViewById(R.id.tv_test2);
        textView.setText("测试页面变了");
    }
}
